package com.wt.wechatTools.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

//用户
@Entity
public class UserEntity {
    @PrimaryKey(autoGenerate = true)
    private Integer id;

    @ColumnInfo(name="userName")
    private String userName;

    @ColumnInfo(name="pwd")
    private String pwd;

    @ColumnInfo(name="token")
    private  String token;

    @ColumnInfo(name="count")
    private  Integer count;  //每次任务数量

    @ColumnInfo(name="taskBatch")   //最近任务批次
    private Integer taskBatch;

    @ColumnInfo(name="speed")
    private Integer speed; //任务执行速度，任务执行间隔

    @ColumnInfo(name="endTime")   //用户套餐结束时间
    private String endTime;

    @ColumnInfo(name="dataSource")   // 使用的数据源
    private String dataSource="";

    @ColumnInfo(name="role")   // 用户权限、角色   1普通用户   2高级用户
    private Integer role;

    public UserEntity(Integer id, String userName, String pwd, String token, Integer count, Integer taskBatch, Integer speed, String endTime, String dataSource, Integer role) {
        this.id = id;
        this.userName = userName;
        this.pwd = pwd;
        this.token = token;
        this.count = count;
        this.taskBatch = taskBatch;
        this.speed = speed;
        this.endTime = endTime;
        this.dataSource = dataSource;
        this.role = role;
    }

    @Override
    public String toString() {
        return "UserEntity{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", pwd='" + pwd + '\'' +
                ", token='" + token + '\'' +
                ", count=" + count +
                ", taskBatch=" + taskBatch +
                ", speed=" + speed +
                ", endTime='" + endTime + '\'' +
                ", dataSource='" + dataSource + '\'' +
                ", role=" + role +
                '}';
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
        this.dataSource = dataSource;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getSpeed() {
        return speed;
    }

    public void setSpeed(Integer speed) {
        this.speed = speed;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getTaskBatch() {
        return taskBatch;
    }

    public void setTaskBatch(Integer taskBatch) {
        this.taskBatch = taskBatch;
    }
}
